package eventStrategies;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

import stars.StarModel;
import eventManager.AppEvent;
import eventManager.IEventListener;
import events.ECodeEventList;
import events.SetStarTypeEvent;

public class SetStarTypeStrategy implements IEventListener {

	private HashSet<String> eventTypes = new HashSet<String>();	
	
	public SetStarTypeStrategy() {
		eventTypes.add("setStarType");
	}

	
	public void handleEvent(AppEvent event) {
		Object[] objs = event.getEventObjects();
		//SetStarTypeEvent fullEvent = (SetStarTypeEvent) event;
		String type = (String) objs[0];		
		StarModel fullModel = (StarModel) objs[1];
		
		fullModel.setType(type);		
	}
	
	public Set<String> getEventTypes() {
		return this.eventTypes;
	}

}
